<?php
$img = 'img/default.jpg';
if (isset($_GET['categoria'])) {
    $c = Doctrine::getTable('categoria')->findOneBySlug($_GET['categoria']);
    $text = $c->value;
    $img = 'content/categorias/'.$c->banner->src;
} else if (isset($_GET['tag'])) {
    $text = Doctrine::getTable('tag')->findOneBySlug($_GET['tag'])->value;
} else if (isset($_GET['year'])) {
    $text = $_GET['mes'].' '.$_GET['year'];
} else if (isset($_GET['busqueda'])) {
    $text = 'Búsqueda';
}
echo('
    <header class="category-header" style="background-image: url(\''.$img.'\');">
        <h3>'.$text.'</h3>
    </header>
');
?>
